package com.test;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;

import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;

import com.guo.hui.dao.blog.TpArticleMapper;
import com.guo.hui.dao.blog.TpTimelineMapper;
import com.guo.hui.dao.shiro.TpPermissionMapper;
import com.guo.hui.dao.shiro.TpRoleMapper;
import com.guo.hui.dao.shiro.TpUserMapper;
import com.guo.hui.model.blog.TpArticle;
import com.guo.hui.model.shiro.TpUser;

@ContextConfiguration(locations = { "classpath:/spring-mybatis.xml" })
public class UnitShiro extends AbstractJUnit4SpringContextTests {
	@Autowired
	private TpUserMapper tpUserDao;
	@Autowired
	private TpRoleMapper tpRoleDao;
	@Autowired
	private TpPermissionMapper tpUpermissonDao;

	@Test
	public void test() {

		TpUser tpUser = tpUserDao.loginAuth("admin", "admin");

		// Set<String> li = tpRoleDao.selectByUserId(1);
		// Set<String> permissions = tpUpermissonDao.selectByUserId(1);
		System.out.println(tpUser);
	}

}
